import {defaultImg } from "../../../utils/config";
const app = getApp();
Page({
  data: {
    actshareinfo:{},
    ljtj:'',
    endTime:'',
    defaultImg: defaultImg
  },
//获取缓存中存储的活动信息
onLoad(query) {
  let actshareinfo = wx.getStorageSync('actshareinfo');
  actshareinfo = actshareinfo ? JSON.parse(actshareinfo):null;
  this.setData({
    actshareinfo: actshareinfo,
    endTime: actshareinfo.date + " " + actshareinfo.time
  })  
  //助力个数
  let helpNumber = actshareinfo.helpNumber ? actshareinfo.helpNumber : 'X';
  if (actshareinfo.helpWayCode==0){
    this.setData({
      ljtj: '邀请好友助力达' + helpNumber +'即可领奖',
    })  
  } else if (actshareinfo.helpWayCode == 1) {//助力前N名
    this.setData({
      ljtj: '助力排名前' + helpNumber + '即可领奖',
    })    
  }
  console.log(actshareinfo);   
},
onShow(){
},
})